// 组合redux的子模块
import { configureStore } from "@reduxjs/toolkit";
import userReducer from "./modules/user";
import { composeWithDevTools } from 'redux-devtools-extension';
const store = configureStore({
    reducer: {
        user: userReducer,
    },
    // 使用composeWithDevTools来启用Redux DevTools
    middleware: (getDefaultMiddleware) => getDefaultMiddleware(), // 如果有自定义middleware，可以添加到这里
    devTools: process.env.NODE_ENV !== 'production', // 在生产环境中禁用DevTools
    enhancedReducer: composeWithDevTools(), // 启用DevTools
});
export default store;